using System.Collections.Generic;
using System.Xml.Linq;

namespace ThoughtWorks.CruiseControl.Core.Config.Preprocessor
{
    /// <summary>
    /// 	
    /// </summary>
    public class PreprocessorSettings
    {
	    /// <summary>
	    /// Are explicit symbol declarations required?
	    /// If true, it is an error to attempt to evaluate a symbol
	    /// which has not been defined by the input file via the 
	    /// <c>define</c> or <c>default</c> statement.
	    /// </summary>
	    public bool ExplicitDeclarationRequired { get; set; }

        /// <summary>
        /// Name/value pairs of variables which are turned into preprocessor
        /// definitions at global scope.  If <c>ExplicitDeclarationRequired</c> is true,
        /// these definitions may not be used.
        /// </summary>
        public IDictionary<string, string> InitialDefinitions { get; set; }

        /// <summary>
        /// Should constant names be case-sensitive?
        /// </summary>
        public bool NamesAreCaseSensitve { get; set; }

	    private XNamespace _namespace;
	    /// <summary>
	    /// XML Namespace to be used for built-in commands.
	    /// </summary>
	    public XNamespace Namespace
	    {
		    get { return _namespace ?? ( _namespace = XNamespace.Get( "urn:config.preprocessor" ) ); }
		    set { _namespace = value; }
	    }

        /// <summary>
        /// Ignore semantically-insignificant whitespace
        /// </summary>
        public bool IgnoreWhitespace { get; set; }
    }
}
